<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<input type="hidden" name="zh_parsen/fzr_name"
	value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name"/>" />
<input type="hidden" name="zh_parsen/fzr_mobile"
	value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile"/>" />
<input type="hidden" name="zh_parsen/fzr_tel"
	value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work"/>" />
<input type="hidden" name="zh_parsen/fzr_email"
	value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email"/>" />
<div class="t_bar">
	<span class="color_red">*</span>
	项目基本情况
</div>
<table class="t_css" width="100%" border="0" cellpadding="0"
	cellspacing="1" id="pro_info">
	<col style="width: 25%" />
	<col style="width: 25%" />
	<col style="width: 25%" />
	<col style="width: 25%" />
	<tr class="li_1">
		<td align="right">项目名称：</td>
		<td colspan="3">
			<input type='text' name='proposal/zh_title' id='zh_title'
				style="width:608px" class="input_css required maxlength:100"
				maxlength="100"
				value='<x:out select="$xmlData/data/proposal/zh_title"/>'
				label="项目名称">
		</td>
	</tr>
	<tr>
		<td align="right">归口管理部门：</td>
		<td colspan="3">
			<c:set var="recomend_org">
				{'id':'<x:out select="$xmlData/data/proposal/recomend_org_value" />',
				'name':'<x:out select="$xmlData/data/proposal/recomend_org_name" />'
				}					
			</c:set>
			<cpt:tree id="recomend_org" key="recommended_org" cacheable="false"
				className="hn_iuput_kuang required selectWidth3" readonly="true"
				value="${recomend_org}" label="归口管理部门" showPattern="all"
				shieldPattern="0" onClick="initTreeValue2">
			</cpt:tree>
			<input type="hidden" id="recomend_org_value"
				name="proposal/recomend_org_value"
				value="<x:out select="$xmlData/data/proposal/recomend_org_value" />">
			<input type="hidden" name="proposal/recomend_org_name"
				value="<x:out select="$xmlData/data/proposal/recomend_org_name" />">
		</td>
	</tr>
	<tr>
		<td align="right">项目开始时间：</td>
		<td>
			<input name="proposal/start_date" id="start_date"
				value="<x:out select="$xmlData/data/proposal/start_date"/>"
				class="date required dateCompareBeforeE:start_date:end_date" label="项目开始时间" />
		</td>
		<td align="right">项目结束时间：</td>
		<td>
			<input name="proposal/end_date" id="end_date"
				value="<x:out select="$xmlData/data/proposal/end_date"/>"
				class="date required" label="项目结束时间" />
		</td>
	</tr>
	<tr>
		<td align="right">所属领域：</td>
		<td colspan="3">
			<c:set var="sub_type">
				<x:out select="$xmlData/data/proposal/sub_type" />
			</c:set>
			<cpt:checkbox key="domain_hmgc" name="proposal/sub_type"
				value="${sub_type }" width="70px;" repeatColumn="3"
				style="border: 0px; padding: 0px; margin: 0px;float:left;"
				tagType="radio"></cpt:checkbox>
			<input type="hidden" id="sub_type_value"
				name="proposal/sub_type_value" class="required"
				value="<x:out select="$xmlData/data/proposal/sub_type_value" />"
				label="所属领域">
			<input type="hidden" name="proposal/sub_type_name"
				value="<x:out select="$xmlData/data/proposal/sub_type_name" />">
		</td>
	</tr>
	<tr>
		<td align="right">项目联系人姓名：</td>
		<td>
			<input type="text" label="项目联系人姓名" name="proposal/contact_psn_cname"
				class="input_css required" maxlength="50"
				value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />">
			<%-- <span name="proposal/contact_psn_cname"> 
			    	<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_name"/>
		    	</span> --%>
		</td>
		<td align="right">联系人手机：</td>
		<td>
			<input type="text" label="联系人手机" name="proposal/contact_psn_mobile"
				class="required mobile" onfocus="InitInput.setNumber(this,11,0,0);"
				value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />"  />
		</td>
	</tr>
	<tr>
		<td align="right">职称：</td>
		<td>
			<c:set var="json_contact_prof_title_value">
				{'id':'<x:out select="$xmlData/data/proposal/contact_prof_title_value" />',
				'name':'<x:out select="$xmlData/data/proposal/contact_prof_title_name" />'
				}					
			</c:set>

			<cpt:tree key="prof_title" cacheable="false" value="${json_contact_prof_title_value }"
				id="contact_prof_title" name="contact_prof_title" readonly="true"
			 	onClick="initTreeValueExt" />
			 	
			<input type="hidden" id="contact_prof_title_value"
				name="proposal/contact_prof_title_value"
				value="<x:out select="$xmlData/data/proposal/contact_prof_title_value" />" class="required" label="职称" />
			<input type="hidden" id="contact_prof_title_name"
				name="proposal/contact_prof_title_name"
				value="<x:out select="$xmlData/data/proposal/contact_prof_title_name"/>" />
			
		</td>
		<td align="right">职务：</td>
		<td>
			<input name="proposal/contact_position"
				value="<x:out select="$xmlData/data/proposal/contact_position"/>"
				class="required maxlength:50" label="职务" />
		</td>
	</tr>
	<tr>
		<td align="right">办公电话：</td>
		<td>
			<input name="proposal/contact_tel"
				value="<x:out select="$xmlData/data/proposal/contact_tel"/>"
				class="required maxlength:50"
				label="办公电话" />
		</td>
		<td align="right">电子邮箱：</td>
		<td>
			<input name="proposal/contact_email"
				value="<x:out select="$xmlData/data/proposal/contact_email"/>"
				class="required maxlength:50 email" label="电子邮箱" />
		</td>
	</tr>

	<tr>
		<td align="right">传真：</td>
		<td>
			<input name="proposal/contact_fax"
				value="<x:out select="$xmlData/data/proposal/contact_fax"/>"
				class="required maxlength:50" label="传真" />
		</td>
		<td align="right">项目申请金额（万元）：</td>
		<td>
			<input type='text' name='proposal/request_money' class="required"
				id='request_money' onfocus="InitInput.setNumber(this,9,4,2)"
				style="text-align: right;"
				value='<x:out select="$xmlData/data/proposal/request_money"/>'
				label="项目申请金额">
		</td>
	</tr>
	<tr>
		<td align="right">
			项目报审级次：
			<br />
			（省补助资金拨付所属财政局）
		</td>
		<td colspan="3">
			<c:set var="sub_step">{'id':'<x:out
					select="$xmlData/data/proposal/sub_step_value" />','name':'<x:out
					select="$xmlData/data/proposal/sub_step_name" />'}</c:set>
			<cpt:tree key="sub_step" cacheable="false"
				className="hn_iuput_kuang  " readonly="true" value="${sub_step}"
				label="项目报审级次" id="sub_step" onlyChooseLeaf="false"
				showPattern="all" shieldPattern="0" topCheckbox="true"
				onClick="initTreeValueExt" />
			<input id="sub_step_value" type="hidden"
				name="proposal/sub_step_value" class="required" label="项目报审级次"
				value="<x:out select="$xmlData/data/proposal/sub_step_value" />" />
			<input id="sub_step_name" type="hidden" name="proposal/sub_step_name"
				value="<x:out select="$xmlData/data/proposal/sub_step_name" />" />
		</td>
	</tr>
	<tr>
		<td>主要目标主要任务考核指标（限280字）：</td>
		<td colspan="3">
			<textarea name="project/tech_assign" style="width: 98%" class="input_textarea required  maxlength:280" label="主要目标主要任务考核指标" rows=5 cols=60><x:out select="$xmlData/data/project/tech_assign" /></textarea>
			<input type="hidden" name="project/tech_assign_hidden"
				id="project/tech_assign_hidden"
				value="<x:out select="$xmlData/data/project/project/tech_assign_hidden" />" />
		</td>
	</tr>
</table>
<script type="text/javascript">
$(function(){
	 showAllDateTag("pro_info");	
});
	
function initTreeValueExt(treeId, treeNode) {
	  if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
		scmWarn($("#" + treeId).attr("label") + messageTip.researchAreaInvalidDisciplineCode);
		if (treeNode.level == 0) {
			$("#" + treeId).val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val("");
		}
		
		return false;
		}
	
	
		var str = treeNode.name;
		var obj = treeNode.parentNode;
		while (obj != null) {
			obj = obj.parentNode;
		}
		
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val(str);
		
	}
</script>
